package com.hjm.project.retainRewards.mapper;

import java.util.List;
import com.hjm.project.retainRewards.domain.RetainRewards;
import org.apache.ibatis.annotations.Param;

/**
 * 奖励留存Mapper接口
 *
 * @author maker-platform
 * @date 2024-04-15
 */
public interface RetainRewardsMapper
{
    /**
     * 查询奖励留存
     *
     * @param id 奖励留存ID
     * @return 奖励留存
     */
    public RetainRewards selectRetainRewardsById(Integer id);

    /**
     * 查询奖励留存列表
     *
     * @param retainRewards 奖励留存
     * @return 奖励留存集合
     */
    public List<RetainRewards> selectRetainRewardsList(RetainRewards retainRewards);

    /**
     * 查询奖励留存列表
     *
     * @param retainRewards 奖励留存
     * @return 奖励留存查询一个结果
     */
    public RetainRewards selectRetainRewardsOne(RetainRewards retainRewards);
    public RetainRewards selectRetainRewardsBy(@Param("actId") String actId, @Param("agentNum") String agentNum, @Param("type") String type);
    public RetainRewards selectRetainRewardsByStage(@Param("actId") String actId,
                                               @Param("agentNum") String agentNum,
                                               @Param("type") String type,
                                               @Param("stage") String stage);

    /**
     * 新增奖励留存
     *
     * @param retainRewards 奖励留存
     * @return 结果
     */
    public int insertRetainRewards(RetainRewards retainRewards);
    public int insertRetainRewardsRecord(RetainRewards retainRewards);

    public int updateRetainRewardsStage(RetainRewards retainRewards);


    /**
     * 修改奖励留存
     *
     * @param retainRewards 奖励留存
     * @return 结果
     */
    public int updateRetainRewards(RetainRewards retainRewards);

    /**
     * 删除奖励留存
     *
     * @param id 奖励留存ID
     * @return 结果
     */
    public int deleteRetainRewardsById(Integer id);

    /**
     * 批量删除奖励留存
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteRetainRewardsByIds(String[] ids);
    }
